package com.itheima.service;

import com.itheima.entity.dto.addressbook.AddressBookUpDto;
import com.itheima.entity.dto.addressbook.AddressBookaddDto;
import com.itheima.entity.pojo.AddressBook;
import com.itheima.entity.vo.addressbook.*;

import java.util.List;

/**
 * @author huangzelnag
 * @create 2022-05-20
 */

public interface AddressBookService {

    /**
     * 添加收货地址
     * @param addressBookaddDto
     * @return
     */
    AddressBookaddVo addressBookService(AddressBookaddDto addressBookaddDto);

    /**
     *更新收货地址
     * @param addressBookUpDto
     * @return
     */
    Boolean upAddressBook(AddressBookUpDto addressBookUpDto);

    /**
     * 批量删除地址
     * @param ids
     * @return
     */
    Boolean delAddressBook(String[] ids);

    /**
     * 获取默认地址
     * @return
     */
    AddressBookDefaultVo getAddressBookDefault();

    /**
     * 设置默认收货地址
     * @param addressBook
     * @return
     */
    AddressBookDefaultSave saveAddressBookDefault(AddressBook addressBook);

    /**
     * 获取收货地址列表
     * @return
     */
    List<AddressBookListVo> getAddressBookList();

    /**
     * 根据id获取收货地址
     * @param id
     * @return
     */
    AddressBookByIdVo getAddressBookById(String id);
}
